package de.hauschild.gmltracer.tracer;

import org.apache.commons.math.geometry.Vector3D;

/**
 * a {@link Light} illuminates a scene.
 * 
 * @author Klaus Hauschild
 * @since 1.0.0
 */
public interface Light {

  /**
   * Gets the direction.
   * 
   * @return the direction
   */
  Vector3D getDirection();

  /**
   * Illuminates the point described by the {@link Intersection}.
   * 
   * @param surfaceColor
   *          the surface color
   * @param intersection
   *          the intersection
   * @return the light illumination
   */
  Vector3D illuminates(final Vector3D surfaceColor, final Intersection intersection);

  /**
   * Determines whether the point described by the {@link Intersection} is in the lights shadow or not.
   * 
   * @param scene
   *          the scene
   * @param intersection
   *          the intersection
   * @return <code>true</code> if the point lies in the lights shadow,<br />
   *         <code>false</code> otherwise
   */
  boolean isInShadow(final Shape scene, final Intersection intersection);

}
